//
//  MHEditMemberInfoViewModel.m
//  MiaoCircle
//
//  Created by 许正荣 on 2018/5/12.
//  Copyright © 2018年 acgera. All rights reserved.
//

#import "MHEditMemberInfoViewModel.h"

@implementation MHEditMemberInfoViewModel



-(void)initialize
{
    [super initialize];
    self.title = @"编辑资料";
    self.rightTitle = @"保存";
    self.keyboardEnable = false;
    @weakify(self);
    [self.saveMemberInfoCommand = [RACCommand alloc] initWithSignalBlock:^RACSignal *(id input) {
        @strongify(self);
        return [[[self.services.client editCircleMemberQAinfo:self.member.autoId txt:self.qInfo] mh_parsedResults] doNext:^(id x) {
            self.member.qaInfo = self.qInfo;
            [self.services popViewModelAnimated:YES];
        }];
       
    }];
}

- (instancetype)initWithServices:(id<MHViewModelServices>)services params:(NSDictionary *)params{
    if (self = [super initWithServices:services params:params]) {
        self.member = params[MHViewModelUtilKey];
    }
    return self;
}

@end
